package edu.mit.compilers.assembly.x64.codes;

import edu.mit.compilers.assembly.x64.basic.X64Operand;

public class X64UnaryOpCode extends X64Code {
    public enum Type {
        NEG,
    }

    private X64Operand src;     // also dest
    private Type type;

    public X64UnaryOpCode(X64Operand src, Type type) {
        this.src = src;
        this.type = type;
    }

    @Override
    protected String getStringFroShow(String prefix, boolean debug) {
        assert type == Type.NEG;
        return prefix + "neg" + TAB + src.getAddress() + '\n';
    }

}
